package com.hc.conferencecheck.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 测试图片controller
 */
@Controller
@RequestMapping("/testController")
public class TestController {
    /**
     * 页面跳转，上传图片
     */
    @RequestMapping(value = "/testIndex", method = RequestMethod.GET)
    public String index() {
        return "/index";
    }

    /**
     * 显示图片
     */
    @RequestMapping(value = "/showImage")
    public String showImage(@RequestParam("type") int type, @RequestParam("identifyId") int identifyId, Model model) {
        model.addAttribute("type", type);
        model.addAttribute("identifyId", identifyId);

        return "/showImage";
    }

}
